home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / javax / swing / DebugGraphicsInfo.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  1.1 KB  |  51 lines

  1. package javax.swing;
  2.  
  3. import java.awt.Color;
  4. import java.io.PrintStream;
  5. import java.util.Hashtable;
  6.  
  7. class DebugGraphicsInfo {
  8.    Color flashColor;
  9.    int flashTime;
  10.    int flashCount;
  11.    Hashtable componentToDebug;
  12.    JFrame debugFrame;
  13.    PrintStream stream;
  14.  
  15.    DebugGraphicsInfo() {
  16.       this.flashColor = Color.red;
  17.       this.flashTime = 100;
  18.       this.flashCount = 2;
  19.       this.debugFrame = null;
  20.       this.stream = System.out;
  21.    }
  22.  
  23.    void setDebugOptions(JComponent var1, int var2) {
  24.       if (var2 != 0) {
  25.          if (this.componentToDebug == null) {
  26.             this.componentToDebug = new Hashtable();
  27.          }
  28.  
  29.          if (var2 > 0) {
  30.             this.componentToDebug.put(var1, new Integer(var2));
  31.          } else {
  32.             this.componentToDebug.remove(var1);
  33.          }
  34.  
  35.       }
  36.    }
  37.  
  38.    int getDebugOptions(JComponent var1) {
  39.       if (this.componentToDebug == null) {
  40.          return 0;
  41.       } else {
  42.          Integer var2 = (Integer)this.componentToDebug.get(var1);
  43.          return var2 == null ? 0 : var2;
  44.       }
  45.    }
  46.  
  47.    void log(String var1) {
  48.       this.stream.println(var1);
  49.    }
  50. }
  51.